﻿using System.Xml.Linq;

namespace XSerialization.Generator
{
    public interface IXGenerator
    {
        /// <summary>
        /// Adds the specified file to the generator, using the specified meta informations about code and interface.
        /// </summary>
        /// <param name="xsdFile">File path</param>
        /// <param name="interfaceFile">Interface meta informations</param>
        /// <param name="codeFile">Code meta informations</param>
        void AddFile(string xsdFile, IFileMetaInfo interfaceFile, IFileMetaInfo codeFile);

        /// <summary>
        /// Adds the specified file to the generator, using the specified meta informations about code and interface.
        /// </summary>
        /// <param name="xDocument">XDocument object</param>
        /// <param name="interfaceFile">Interface meta informations</param>
        /// <param name="codeFile">Code meta informations</param>
        void AddFile(XDocument xDocument, IFileMetaInfo interfaceFile, IFileMetaInfo codeFile);

        /// <summary>
        /// Start generation
        /// </summary>
        void Start();

        /// <summary>
        /// Saves all genereated files to the specified location.
        /// </summary>
        void Save();
    }
}
